namespace Collaboris.Saf.Actions.Moss.Tests.Generated
{
    using Engine.Report;

    using Entities;

    using Microsoft.SharePoint.Publishing;
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    using Moss.Publishing;

    using Saf.Tests;

    using SharePoint.Moss.Publishing;

    /// <summary>
    /// This test was originally generated but has now been tested and verfiied by MJ
    /// </summary>
    [TestClass]
    public class PublishPageTest
    {
        #region Public Methods

        [TestMethod]
        public void PublishPage_Test()
        {
            var publishpage = new TestAssistant<PublishPage, SiteAndPage>(
                TestEnvironment.PublishingSite, "PublishPageTestWeb", "BLANKINTERNET#0");

            using (publishpage)
            {
                PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(publishpage.TestWeb);
                PublishingPage page = PublishingPageHelper.GetPage(publishpage.FirstEntity.PageName, publishingWeb);
                page.CheckOut();
                page.CheckIn("I am a new one");

                MacroReport doReport = publishpage.DoMacro();
            }
        }

        #endregion
    }
}